package com.neuedu.grainsapi.controller;

import com.neuedu.grainsapi.pojo.CropRanks;
import com.neuedu.grainsapi.service.CropRanksService;
import com.neuedu.grainsapi.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CropRanksController {
    @Autowired
    private CropRanksService cropRanksService;
    @GetMapping("/queryCropRanks")
    public ResponseResult<List<CropRanks>> queryCropRanks(){
        List<CropRanks> cropRanks = cropRanksService.queryCropRanks();
        return new ResponseResult<>("200","yes",cropRanks);
    }
}
